package com.xywl.escort.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xywl.escort.R;
import com.xywl.escort.bean.FindBankBaseInfoListResp;
import com.xywl.escort.widget.GlideApp;

import java.util.List;

public class CooperativeBandAdapter extends BaseQuickAdapter<FindBankBaseInfoListResp.DataBean, BaseViewHolder> {
    public CooperativeBandAdapter(int layoutResId, @Nullable List<FindBankBaseInfoListResp.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FindBankBaseInfoListResp.DataBean item) {
        ImageView imageView = helper.getView(R.id.image_band);
        GlideApp.with(mContext)
                .load(item.mobileBankIco)
                .centerCrop()
                .placeholder(R.mipmap.icon_default_picture)
                .into(imageView);
        helper.setText(R.id.text_band_name, item.bankName);
        String daily = "单日限额￥" + item.dailyLimit;
        helper.setText(R.id.text_daily, daily);
        String single = "单笔限额￥" + item.singleLimit;
        helper.setText(R.id.text_single, single);
    }
}
